<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <input type="text" id="input"> -->
    <select name="" id="provice">
      <option value="1">江西</option>
      <option value="2">广东</option>
      <option value="3">广西</option>
    </select>
    <button id="btn">点击</button>

    <script>
      // var inputEle = document.getElementById('input')
      // inputEle.addEventListener('input',function(){
      //     console.log('输入中')
      // })

      var btn = document.getElementById('btn');
      var selectEle = document.getElementById('provice');
      selectEle.addEventListener('change', function () {
        console.log(this.value);
      });
      btn.addEventListener('click', function () {
        // selectEle.selectedIndex = 2 ;
        selectEle[1].selected = true;
      });
    </script>
  </body>
</html>
